package com.example.test.springdemo.service.impl;

import com.example.test.springdemo.domain.AdminUser;
import com.example.test.springdemo.mapper.AdminUserMapper;
import com.example.test.springdemo.service.LoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class LoginServiceImpl implements LoginService {

    @Autowired
    private AdminUserMapper adminUserMapper;

    @Override
    public AdminUser findByUserName(AdminUser adminUser) {
        return adminUserMapper.findByUserName(adminUser);
    }

    @Override
    public AdminUser findByIp(String phone) {
        return adminUserMapper.findByIp(phone);
    }

    @Override
    public int update(AdminUser adminUser1) {
        return adminUserMapper.updateByPrimaryKey(adminUser1);
    }

    @Override
    public AdminUser findByUserId(Long id) {
        return adminUserMapper.findByUserId(id);
    }


}
